package gui;

import engine.LDAPManager;
import engine.OntologyBuilder;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author oleksandr
 */
public class BatchImport {

	private static final String[] SERVERS = new String[]{
		//"arc-edu.hpcc.kpi.ua",
		"arc-emi.bitp.kiev.ua",
		"arc.biomed.kiev.ua",
		"arc.diagnostics.kiev.ua",
		"arc.hpc-mhi.org",
		"arc.imbg.org.ua",
		"arc.matmoden.kiev.ua",
		"arc.univ.kiev.ua",
		"cl.iapmm.lviv.ua",
		"cluster-edu.lnu.edu.ua",
		"cluster-fti.ac.donetsk.ua",
		"cluster.immsp.kiev.ua",
		"ds4.ilt.kharkov.ua",
		"felix.iap.sumy.org",
		"golowood.mao.kiev.ua",
		"grid.hpcandfosscenter.od.ua",
		"grid.ifbg.org.ua",
		"grid.imag.kiev.ua",
		"grid.inparcom.kiev.ua",
		"grid.ipm.lviv.ua",
		"grid.ipms.kiev.ua",
		"grid.ire.kharkov.ua",
		"grid.isma.kharkov.ua",
		"grid.isofts.kiev.ua",
		"grid.stu.cn.ua",
		"gridhead.kipt.kharkov.ua",
		"inparcom.kiev.ua",
		"midas.iop.kiev.ua",
		"ng.grid.fcss.ukma.kiev.ua",
		"ng.ikd.kiev.ua",
		"nordu.hpcc.ntu-kpi.kiev.ua",
		"nordug.bitp.kiev.ua",
		"nordug.rian.kharkov.ua",
		"pamela.imp.kiev.ua",
		"simulator.imath.kiev.ua",
		"thei.org.ua",
		"uagrid.org.ua",
		"west.icmp.lviv.ua",
		"arc-emi.bitp.kiev.ua",
		"giis.grid.org.ua"};

	public static void main(String[] args) {
		for (String server : SERVERS) {
			try {
				System.out.println("\n<<<<" + server + ">>>>\n ");
				LDAPManager ldapm = new LDAPManager(server, "2135");
				OntologyBuilder ontologyBuilder =
					new OntologyBuilder("/home/oleksandr/Work/GRO/grid.ua/GRO_2e.owl",
					"/home/oleksandr/Work/GRO/grid.ua/" + server + "_f.owl", "http://" + server);
				ontologyBuilder.createNewEmptyOntology();
				ontologyBuilder.populate(ldapm.retrive("Glue2Entity"));
				ontologyBuilder.flush();
				ldapm.close();
			} catch (Exception ex) {
				Logger.getLogger(BatchImport.class.getName()).log(Level.WARNING, null, ex);
			}
		}
	}
}
